using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks.nGame
{
    [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=64")]
    [TaskCategory("nGame/Conditional")]
    [TaskDescription("Is the Particle System stopped?")]
    public class IsAttack : Conditional
    {
        [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
        public SharedBool isAttack = false;

        public override void OnStart()
        {
        }

        public override TaskStatus OnUpdate()
        {
            if (isAttack.Value) {
                return TaskStatus.Success;
            }

            return TaskStatus.Failure;
        }

        public override void OnReset()
        {
        }
    }
}